# -*- coding: UTF-8 -*-
# __author__ = 'Sengo'


def vertex_multiply(a, b):
    """a*b cross multiply向量叉乘"""
    ax = a[0]
    ay = a[1]
    az = a[2]
    bx = b[0]
    by = b[1]
    bz = b[2]
    cx = ay*bz - az*by
    cy = az*bx - ax*bz
    cz = ax*by - ay*bx
    return [cx, cy, cz]


def vertex_dot_multiply(a, b):
    """向量点乘"""
    ax = a[0]
    ay = a[1]
    az = a[2]
    bx = b[0]
    by = b[1]
    bz = b[2]
    return ax*bx + ay*by + az*bz